/*
 * xdma_lib.h
 *
 *  Created on: Jan 6, 2000
 *      Author: root
 */

#ifndef XDMA_LIB_H_
#define XDMA_LIB_H_


typedef struct asyn_InputInfoMsg {
	void* src;
	int tsize;
} asyn_inputmsg;


int asyn_xdma_main(int coreindex);
void asyn_exitXdma();
void  asyn_bslWaitInputData(int chainNum);
int asyn_bslGetInputData(int chainNum,void* msg);

int asyn_xdma_drvsend(void *srcAddr,unsigned int size,int flag);

int asyn_reset_xdma();
int asyn_start_xdma();
int asyn_stop_xdma();
int asyn_set_fiberNum(int num,int time);
int asyn_set_intSrc(int index);

#if 0
void recvtest(int chainNum)
{
	struct asyn_InputInfoMsg lmsgInfo;
	u32 *pSrc;
	int srcNum = 0;
	int i=0;

	while(1)
	{
		asyn_bslWaitInputData(chainNum);
		printf("recvtest:\n");
		while(asyn_bslGetInputData(chainNum,(struct asyn_InputInfoMsg *)&lmsgInfo))
		{

			pSrc = (u32*)lmsgInfo.src;
			printf("%d,%p,%x\n",i,pSrc,lmsgInfo.tsize);
			printf("Header %x\n",pSrc[0]);
			printf("%d,%p,%x,%x\n",i,pSrc,lmsgInfo.tsize,pSrc);
			if(pSrc[0] == 0xAAAA5555)
			{
				CmpCtrlCheckSysCtl((SYS_CTRL_TAB*)pSrc);
			}
			printf("\n");
		}
	}
}
#endif

#endif /* XDMA_LIB_H_ */
